//
//  WBMessageViewController.swift
//  学习微博
//
//  Created by zengyu on 2017/9/3.
//  Copyright © 2017年 weibo. All rights reserved.
//

import UIKit

class WBMessageViewController: WBBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        //设置标题
        title = "第 \(navigationController?.childViewControllers.count ?? 0) 个"
    }

    //显示消息列表
    @objc fileprivate func showMessages(){
        let vc = WBMessageViewController()
        
        //隐藏底部tabbar
        // vc.hidesBottomBarWhenPushed = true
        navigationController?.pushViewController(vc, animated: true)
    }
}

extension WBMessageViewController{
    override func setupUI(){
        super.setupUI()
        
        navItem.rightBarButtonItem  = UIBarButtonItem(title: "下一个", fontsize: 16, target: self, action: #selector(showMessages))
    }
}
